﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace WMSTest.OnlineMapRequests
{
    abstract class MapRequest
    {
        public enum RequestMethod { GET, POST }

        protected HttpRequest httpRequest;

        public abstract HttpWebResponse PerformExportMapRequest();

        public abstract void SetBbox(double xmin, double ymin, double xmax, double ymax);

        public abstract void SetSize(int width, int height);

        public abstract string ImageFormatString { get; }

        public MapRequest(string endpointUrl, RequestMethod requestMethod)
        {
            if (requestMethod.Equals(RequestMethod.GET))
                httpRequest = new HttpGetRequest(endpointUrl);
            else
                httpRequest = new HttpPostRequest(endpointUrl);
        }
    }
}
